package cn.com.connext.scrm.repository.master;

import cn.com.connext.scrm.domain.master.PrizeExt;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 2 * @Author: shawn
 * 3 * @Date: 2020/8/11 4:15 下午
 * 4
 */
@Repository
public interface PrizeExtRepository extends JpaRepository<PrizeExt, Integer> {

    List<PrizeExt> findByPrizeId(Integer prizeId);
    @Query(value = "select * from prize_ext where prize_id in (:prizeIds) ", nativeQuery = true)
    List<PrizeExt> getListByPrizeIds(@Param("prizeIds") List<Integer> prizeIds);
}
